import IconFont from '@/components/IconFont';
import { cpText } from "@/utils/utils";
import React from 'react';
import { CommonText } from "../../CommonText";
import Style from "../../index.module.less";
/**
 * 复制文本组件
*/
export const ClipboardText = (props) => {
    const { text, ...args } = props;
    return (<CommonText  text={text} after={text ? (<span className={Style.clipboard} onClick={() => {
                cpText(text);
            }}>
          <IconFont type="iconclipboard"/>
        </span>) : <></>} {...args}/>);
};
export default ClipboardText;
